<!DOCTYPE html>
<!--suppress ALL-->
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改热解析')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-analysis-edit" th:object="${meterAnalysis}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label">热表型号：</label>
                <div class="col-sm-8">
                    <select id="typeId" name="typeId" class="form-control">
                        <option th:each="type:${types}" th:value="${type.typeId}" th:text="${type.typeName}" th:field="*{typeId}"></option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">字段名：</label>
                <div class="col-sm-8">
                    <input name="columnName" th:field="*{columnName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">变量：</label>
                <div class="col-sm-8">
                    <select id="variable" name="variableName" class="form-control m-b"  th:with="type=${@dict.getType('variable')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{variableName}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">字段起始位：</label>
                <div class="col-sm-8">
                    <input name="columnStart" th:field="*{columnStart}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">字段结束位：</label>
                <div class="col-sm-8">
                    <input name="columnEnd" th:field="*{columnEnd}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">字段排序：</label>
                <div class="col-sm-8">
                    <select id="columnOrder"  name="columnOrder" class="form-control m-b" th:with="type=${@dict.getType('column_order')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{columnOrder}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">字段进制：</label>
                <div class="col-sm-8">
                    <select id="columnHex"  name="columnHex" class="form-control m-b" th:with="type=${@dict.getType('column_hex')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{columnHex}"></option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">字段系数：</label>
                <div class="col-sm-8">
                    <select id="columnCoefficient"  name="columnCoefficient" class="form-control m-b" th:with="type=${@dict.getType('column_coefficient')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{columnCoefficient}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">字段单位位置：</label>
                <div class="col-sm-8">
                    <input name="columnUnit" th:field="*{columnUnit}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">时间是否转换标志：</label>
                <div class="col-sm-8">
                    <select id="columnTime"  name="columnTime" class="form-control m-b" th:with="type=${@dict.getType('column_time')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{columnTime}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "base/analysis";
        $("#form-analysis-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-analysis-edit').serialize());
            }
        }
    </script>
</body>
</html>